package thread;

public class ThreadInfoDemo {
    public static void main(String[] args) {
        Thread t=new Thread("name"){
            public void run(){
              String name=this.getName();
                System.out.println(name);

                long id=this.getId();//id:唯一标识
                System.out.println(id);

                boolean isInterrupted=this.isInterrupted();
                boolean isDaemon=this.isDaemon();
                boolean isAlive=this.isAlive();
                System.out.println("是否被中断:"+isInterrupted);
                System.out.println("是否是守护线程:"+isDaemon);
                System.out.println("是否还活着:"+isAlive);
            }
        };
        t.start();
    }
}
